import { HashRouter, Route, hashHistory } from 'react-router-dom'; // react-router v4
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from '../redux/configureStore';
import { createStore } from 'redux';
import '../styles/theme.css';
import Home from '../containers/Home';
import Upload from '../containers/Upload';
import AppView from '../views/AppView';
import rootReducers from '../redux/rootReducers';

const store = configureStore(rootReducers); //window.__INITIAL_STATE__
ReactDOM.render(
    (<Provider store={store}>
        <HashRouter history={hashHistory}>
                <AppView>
                <Route exact path="/" component={Home} />
                <Route path="/upload" component={Upload} />
                </AppView>
        </HashRouter></Provider>), document.getElementById('app'))

